package com.igs.muziapp.view;

import com.igs.muziapp.R;
import com.igs.muziapp.R.layout;
import com.igs.muziapp.utils.DensityUtil;

import android.content.Context;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.RelativeLayout;
import android.widget.TextView;

public class Playdata_row0 {
	private View view;
	private Context context;
	private TextView ItemName;
	private TextView ItemValue;
	private RelativeLayout Item_Box;

	public Playdata_row0(Context context) {
		this.context = context;
		DensityUtil densityutil = new DensityUtil();
		ViewGroup.LayoutParams param = new ViewGroup.LayoutParams(LayoutParams.FILL_PARENT, densityutil.dip2px(context, 42));
		LayoutInflater mLi = LayoutInflater.from(context);
		view = mLi.inflate(R.layout.muzi_playerdata_row0, null);
		view.setLayoutParams(param);

		ItemName = (TextView) view.findViewById(R.id.textView_itemname);
		ItemValue = (TextView) view.findViewById(R.id.textView_value);
		Item_Box = (RelativeLayout) view.findViewById(R.id.RelativeLayout_Box);

	}

	public void setItemValueShow(boolean flag) {
		ItemValue.setVisibility(flag ? View.VISIBLE : View.INVISIBLE);
	}

	public void setItemNameString(String text) {
		ItemName.setText(text);
	}

	public void setBackgroundColor(int color) {
		Item_Box.setBackgroundColor(color);
	}

	public void setItemValueString(String text) {
		ItemValue.setText(text);
	}

	public View getView() {
		return view;
	}

}
